/*
 * @(#) $Header$
 *
 * Copyright (C) 2006  Daniel Léonard
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package ca.forklabs.baselib.swing.filechooser;

import javax.swing.filechooser.FileFilter;

/**
 * Class {@code AbstractFileFilter} provides a framework for all the file
 * filters.
 *
 * @author   <a href="mailto:forklabs at gmail.com?subject=ca.forklabs.baselib.swing.filechooser.AbstractFileFilter">Daniel Léonard</a>
 * @version $Revision$
 */
public abstract class AbstractFileFilter extends FileFilter {

//---------------------------
// Instance variable
//---------------------------

   /** The description. */
   private String description;


//---------------------------
// Constructor
//---------------------------

   /**
    * Constructor.
    * @param   description   the description.
    */
   protected AbstractFileFilter(String description) {
      this.setDescription(description);
      }


//---------------------------
// Mutator
//---------------------------

   /**
    * Changes the description.
    * @param   description   the new description.
    */
   protected void setDescription(String description) {
      this.description = description;
      }


//---------------------------
// Implemented method from javax.swing.filechooser.FileFilter
//---------------------------

   /**
    * Gets the description.
    * @return   the description.
    */
   @Override
   public String getDescription() {
      return this.description;
      }

   }
